package com.itheima;


import com.itheima.dao.UserDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

//通过构造方法实例化
public class App4 {
        public static void main(String[] args) {
            ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
            UserDao userDao = (UserDao) ctx.getBean("userDao1");
            userDao.save();
            /*factory setup 静态工厂的方式实例化....
              user dao save 方法在执行...*/
        }

}
